home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / tsql / doc / tsql.mail / 000077_csj@iesd.auc.dk _Thu Apr 8 21:26:07 1993.msg < prev    next >
Internet Message Format  |  1996-01-31  |  22KB

  1. Received: from iesd.auc.dk by optima.cs.arizona.edu (5.65c/15) via SMTP
  2.     id AA15069; Thu, 8 Apr 1993 12:26:45 MST
  3. Received: from yellow.iesd.auc.dk by iesd.auc.dk with SMTP id AA21788
  4.   (5.65c8/IDA-1.5/MD for <tsql@cs.arizona.edu>); Thu, 8 Apr 1993 21:26:07 +0200
  5. Date: Thu, 8 Apr 1993 21:26:07 +0200
  6. From: "Christian S. Jensen" <csj@iesd.auc.dk>
  7. Message-Id: <199304081926.AA21788@iesd.auc.dk>
  8. To: tsql@cs.arizona.edu
  9. Subject: TSQL Benchmark, Tasks 1 and 2.
  10.  
  11. ********************************************************************
  12. *                  The TSQL Benchmark Initiative                   *
  13. ********************************************************************
  14.  
  15. Fellow contributors,
  16.  
  17. In this message, I provide some comments on the most recent postings
  18. to tsql about the TSQL Benchmark. In particular, I focus on a single
  19. comment on the purpose of the benchmark, on the final changes to the
  20. database schema, and on a first comment on the proposed database
  21. instance.
  22.  
  23. I have also included an up-to-date version of the benchmark document.
  24. Apart from simple renaming of attributes, the database schema is now
  25. frozen. The section on the database instance is now in focus.
  26.  
  27. On the purpose of the benchmark...
  28. **********************************
  29.  
  30. > From UZTBB@CUNYVM.CUNY.EDU Fri Apr  2 19:07:44 1993
  31. > On the expressive power....
  32. > _____________________________
  33. > Crist states that the aim of this draft is on user friendliness of
  34. > temporal query languages.  I think the user friendliness and the
  35. > expressive  power of temporal query languages are closely related.
  36. > We should not seperate them.  In this respect we should include
  37. > all the possible queries in the bench mark.  Perhaps, a subset of
  38. > these queries is more common in real life and this subset may be
  39. > a desirable one.  At the earlier stage of the benchmark we place
  40. > our attention on this subset if thw TSLQ community feels that way.
  41.  
  42. This is close to how I think. Let me just elaborate a bit. User
  43. friendliness is mentioned mainly to indicate that we are not only
  44. looking for as difficult and challenging queries as possible, but are
  45. also interested in ordinary, common queries. A TSQL language must
  46. handle common queries, as well as hard queries, satisfactorily. In the
  47. first version, we are not restricted to easy or hard queries, rather
  48. the restrictions are in other dimensions.
  49.  
  50. On the final changes to the database schema...
  51. **********************************************
  52.  
  53. > From UZTBB@CUNYVM.CUNY.EDU Fri Apr  2 19:07:44 1993
  54. > I would propose adding a BUDGET attribute to Mgr relation.  It is a
  55. > temporal attribute and allows comparison between two temporal attributes
  56. > from two different relations.
  57.  
  58. In my previous summary (April 4), I made some decisions regarding the
  59. database schema. With the exception of these decisions, the schema
  60. design was finalized. As part of the summary, I requested opinions
  61. regarding the inclusion of a Budget attribute.
  62.  
  63. > Date: Sun, 4 Apr 1993 22:57:12 +0200
  64. > From: "Christian S. Jensen" <csj@iesd.auc.dk>
  65. > This is an interesting suggestion, and I request further comments on
  66. > this. If other contributors feel that this extra attribute allows them
  67. > to formulate types of queries that the existing schema does not allow,
  68. > it would be very useful to hear about that very soon.
  69.  
  70. Several contributors have later indicated that they also would like a
  71. Budget attribute. Such an attribute has now been added.
  72.  
  73. Jim, in a recent message, comments on the semantics of the Mgr schema
  74. intended to hold the Budget attribute.
  75.  
  76. > Date: Tue, 6 Apr 93 13:42:10 EDT
  77. > From: Jim Clifford <jcliffor@is-4.stern.nyu.edu>
  78. >
  79. > (2) I was already somewhat confused by the relation currently constituted as
  80. >        MGR (Dept Manager)
  81.  
  82. First, I briefly explain the original schema, then I consider the
  83. situation after a Budget attribute is introduced.
  84.  
  85. Before introducing Budget, the schema Mgr = (Dept, Manager) was
  86. intended to relate departments with those employees that are the
  87. managers of the departments. Thus, Mgr models a relationship set
  88. between entity sets of employees and departments, respectively.  A
  89. foreign key constraint (between Manager in Mgr and Name in Emp) was
  90. introduced to indicate that the Emp relation represented the one
  91. connecting entity set. The other entity set, that for departments, was
  92. left out because it was deemed unnecessary.
  93.  
  94. When Budget is added, we get Mgr = (Dept, Manager, Budget). We must
  95. then ask whether Budget is an attribute of the relationship between
  96. managers and departments or an attribute of departments. Jim favors
  97. the latter (and I agree completely), so now the Mgr relation is about
  98. departments. The final result of these considerations is then this
  99. schema (as requested by Jim):
  100.  
  101.        Dept = (Department, Manager, Budget)
  102.  
  103. The attribute Department is the name of the department. This is a
  104. lengthy attribute, and any suggestions for shorter names are welcome.
  105. Also, Dept is now used as an attribute name (in Emp) and as a schema
  106. name. I take it that we want to add the functional dependency
  107. Department --> Budget (a department can only have one budget at any
  108. given point in time).
  109.  
  110. The changes to the benchmark document implied above are in agreement
  111. with Shashi's recommendations:
  112.  
  113. > From info-tsql-sender@cs.arizona.edu Thu Apr  8 00:16:33 1993
  114. > From: Shashi K. Gadia <gadia@cs.iastate.edu>
  115. > Subject: Benchmark
  116. >
  117. > I also am in favor of Jim Clfford's 
  118. > suggestion of treating Name and 
  119. > Dept as time invariant keys. 
  120. >
  121. > However, I would prefer to keep 
  122. > the attribute names for the department 
  123. > relation short as suggested by Christian.  
  124.  
  125. Name (of Emp) and Department (of Dept) are primary keys, and we are
  126. looking for shorter attribute names.
  127.  
  128. On the database instance...
  129. ***************************
  130.  
  131. Finally, Jim raises an unrelated concern. As of now, its impact on the
  132. benchmark document is unclear to me. The following is an attempt to
  133. clarify the situation.
  134.  
  135. > Date: Tue, 6 Apr 93 13:42:10 EDT
  136. > From: Jim Clifford <jcliffor@is-4.stern.nyu.edu>
  137. >
  138. > I believe that the following criterion should be used in
  139. > populating the agreed-upon schema with data:
  140. >
  141. >   the database instance should accord with ALL AND ONLY those 
  142. >   constraints which are explicitly stated.
  143. >
  144. > The proposed database instance violates the AND ONLY part of this criterion in
  145. > at least the following way (and possibly others):
  146. ...
  147. >
  148. > However, the proposed database also assumes that the "key" attribute
  149. > Name is time-invariant. This is a stronger condition than the notion
  150. > of "key" as a "snapshot function dependency," and biases the proposed
  151. > benchmark in favor of the tuple-stamped models.
  152.  
  153. It would be of great help if someone (Jim?) could exemplify what is
  154. missing in the current instance. What can we add to the instance in
  155. order not to violate the AND ONLY criterion? Should we add this, or
  156. should we strengthen the constraints?
  157.  
  158. How do we favor tuple timestamped models? Are we excluding some data
  159. that cannot (easily) be stored in tuple-timestamped models, but may be
  160. stored in other models?
  161.  
  162. These are all interesting and important questions. Let me add a few
  163. preliminary thoughts.
  164.  
  165. Jim implies that Name is time-invariant. The question is then with
  166. respect to what? To be specific, consider a schema Emp = (Name, Salary)
  167. with Name --> Salary. The schema may be characterized in at least two
  168. ways.
  169.  
  170. 1. Name is the name of a person, and Salary is the salary of that
  171. person. The notion of time-invariance is then exemplified as follows.
  172. If the person never changes her name then Name is time-invariant.
  173.  
  174. 2. Instances of Emp are simply pairs of text strings and integers,
  175. representing names and salaries, that obey the specified dependency.
  176. In this context, it does not make sense to talk about whether Name is
  177. time-invariant or not. Time-invariant with respect to what?
  178.  
  179. The standard relational model and conventional normalization and
  180. dependency theory cannot capture the connection between Emp tuples and
  181. the real-world persons they represent. There is no real notion of
  182. object identity (existence). When the key of a tuple changes its
  183. value, there in no way of telling that the tuple still represent the
  184. same real-world person. For example, if the tuple for Di, (Di, 30K),
  185. is changed to (Jo, 30K) because Di changes name, we cannot capture
  186. that both tuples belong to the same person and that Name thus is
  187. time-varying.
  188.  
  189. One solution is to extend the relational model and use surrogates
  190. (system-generated, unique identifiers with values that cannot be seen
  191. but only compared for equality). The use of surrogates certainly works
  192. in tuple-stamped models and should also work in attribute-value
  193. stamped models.
  194.  
  195. Best regards,
  196. Christian
  197.  
  198. \documentstyle[11pt]{article}
  199. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  200. % This paper is intended to evolve into the first version of the TSQL
  201. % benchmark.  
  202. % The purpose of this draft is to settle on a database instance for
  203. % the already agreed-upon database schema.
  204. % The purpose of the following draft is then to define a taxonomy to
  205. % be used for categorizing the benchmark queries that will follow.
  206. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  207.  
  208. \addtolength{\textwidth}{1.485in}
  209. \setlength{\oddsidemargin}{.1in}
  210. \setlength{\evensidemargin}{.1in}
  211. \addtolength{\topmargin}{-.85in}
  212. \addtolength{\textheight}{1.8in}
  213.  
  214. \newenvironment{prog} { \begin{center} \begin{minipage}{3in}
  215. \begin{tabbing} nnnn\=nnnn\=nnnn\=nnnn\=nnnn\=nnnn\=nnnn\=\kill
  216. }{\end{tabbing} \end{minipage} \end{center}}
  217.  
  218. \long\def\comment#1{}
  219. \newcommand{\mvd}{\mbox{$\rightarrow \!\!\! \rightarrow \;$}}
  220. \newcommand{\autsp}{$\;\;\;$}
  221.  
  222. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  223. % PAPER START
  224. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  225.  
  226. \begin{document}
  227.  
  228. \title{\Large\bf The TSQL Benchmark \\ DRAFT} 
  229. \author{James Clifford \autsp Shashi K.~Gadia \autsp Fabio Grandi
  230.   \autsp Christian S.~Jensen \\ Patrick Kalua \autsp Sunil Nair \autsp
  231.   Edward Robertson \autsp John F.~Roddick \\ Maria Rita Scalas \autsp
  232.   Richard T.~Snodgrass \autsp Abdullah Tansel \autsp Paolo Tiberio
  233.   \autsp Gene Wuu}
  234.  
  235. %Note that the list of authors is preliminary and may not be accurate!
  236.  
  237. \date{April 8, 1993} 
  238. \maketitle
  239.  
  240. \section{Introduction}
  241.  
  242. \subsection{Goal}
  243.  
  244. The central goal of this document is to provide the temporal database
  245. community with a {\em comprehensive consensus benchmark} for temporal
  246. query languages that is {\em independent} of any existing language
  247. proposal.
  248.  
  249. This is not a performance benchmark, but is rather a {\em semantic}
  250. benchmark intended to be an aid in evaluating the user-friendliness of
  251. proposals for temporal query languages. Thus, temporal query languages
  252. should ideally be able to express the benchmark queries both
  253. conveniently and naturally.
  254.  
  255. To obtain a consensus benchmark, researchers in temporal databases
  256. have been invited to participate in this initiative, and each researcher
  257. that has contributed significantly will be a coauthor. The electronic
  258. mail distribution {\tt tsql@cs.arizona.edu} is used as the medium for
  259. discussing the benchmark and related issues.
  260.  
  261. As a consequence of the central goal above, no existing temporal data
  262. models are used or mentioned. The relation schemas of the benchmark
  263. are expressed as sets of attributes, including one attribute
  264. illustrating user-defined time. However, the underlying temporal
  265. aspects are implicit (of course, specific temporal data models might
  266. add explicit temporal attributes). The contents of the relations are
  267. described in natural language. The benchmark queries are also given
  268. only in natural language.
  269.  
  270. The benchmark is {\em not} intended to constitute a metric for query
  271. language completeness, and as such it is not a substitute for a
  272. rigorous {\em theoretical} study of expressive powers of various
  273. temporal query languages. Comprehensiveness of the benchmark is
  274. desirable only to ensure that all aspects of query language design are
  275. covered.
  276.  
  277. It it emphasized that using the benchmark as an advanced, quantitative
  278. scoring system for comparing languages makes little sense. Thus, one
  279. language is not necessarily superior to another just because one is
  280. capable of expressing more benchmark queries than the other. Rather,
  281. the focus is on user-friendliness.
  282.  
  283. \subsection{Scope}
  284.  
  285. Within certain boundaries, discussed next, the benchmark is intended
  286. to contain all queries that appear reasonable and that are consistent
  287. with the schema and data of the benchmark.
  288.  
  289. First, the benchmark is of a semantic nature---in its current form, it
  290. is not aimed at performance comparisons. The intention is to provide a
  291. foundation for comparing the descriptive and operational
  292. characteristics and capabilities of temporal query languages, not
  293. their performance characteristics. Properly extended with additional
  294. relation schemas and a variety of large instances, the benchmark can
  295. also be used for performance comparisons.
  296.  
  297. Second, a number of restrictions are imposed on which types of queries
  298. are admissible in this version of the benchmark, including the
  299. following.
  300.  
  301. \begin{itemize}
  302. \item Queries are restricted to valid time only. Transaction-time
  303.   related queries are not explored.
  304.  
  305. \item Schema evolution and versioning are not considered.
  306.  
  307. \item Incompleteness is not considered. 
  308.  
  309. \item Recursive queries are not included.
  310.  
  311. \item General temporal reasoning is beyond the scope of this version
  312.   of the benchmark.
  313.  
  314. \item Queries involving aggregation facilities are not considered.
  315.  
  316. \item Only queries are included---updates are not considered.
  317.  
  318. \comment{
  319. \item Queries involving relations with multivalued dependencies (in
  320.   the snapshot sense) are not explored.}
  321.  
  322. \comment{
  323. \item User-defined time, including the interaction between
  324.   user-defined time and valid time, is not considered.}
  325.  
  326. \comment{
  327. \item Queries involving complex data retrieval are excluded.}
  328.  
  329. \comment{
  330. \item Inheritance at both the schema and data levels is not
  331.   considered.}
  332.  
  333. \comment{
  334. \item Nested queries are not included.}
  335.  
  336. \comment{
  337. \item For simplicity, each relation is used only once in each query.}
  338.  
  339. \end{itemize}
  340.  
  341. These advanced aspects are excluded solely for pragmatic reasons, and
  342. the exclusion is not meant to imply in any way that the aspects are
  343. not important. The restrictions simply represent an attempt to reduce
  344. the size of the initial benchmark to manageable proportions.
  345.  
  346. It is emphasized that this benchmark is merely the first in a sequence
  347. of ever-more comprehensive benchmarks. Later benchmarks will relax the
  348. above restrictions on the scope of comprehensiveness imposed on this
  349. benchmark. Specifically, the next version of the benchmark is intended
  350. to include queries that involve aggregation.
  351.  
  352. \comment{
  353. Specifically, the next version of the benchmark is intended to include
  354. queries that use the same relation more than once, utilize
  355. aggregation, and involve both valid time and user-defined time.}
  356.  
  357. \section{The Benchmark Database Schema}
  358.  
  359. \subsection{Criteria}
  360.  
  361. A suitable database schema for the benchmark should satisfy four
  362. criteria.
  363.  
  364. \begin{itemize}
  365. \item{} The schema should be natural. That is, it should correspond to
  366.   a reasonable, though possibly greatly simplified, segment of the
  367.   real world. This both reduces the need to explain the model and
  368.   enhances the ability to recognize verball pitfalls in the path to
  369.   the query instances.
  370.  
  371. \item{} The schema should be simple. This will aid in making the
  372.   benchmark easy to understand. This criterion restricts the number of
  373.   relation schemas and the number of attributes of the individual
  374.   schemas. Additionally, the names of the relations and of the
  375.   attributes should be short, as they will be referenced repeatedly.
  376.  
  377.   When an extension is proposed, the benefits should be carefully
  378.   compared with the added complexity.
  379.  
  380. \item{} The schema should allow for comprehensiveness within the
  381.   chosen scope. Using the schema, it should be possible formulate
  382.   queries of all the types that appear reasonable.
  383.  
  384.   This indicates a need for at least two related relation schemas (for
  385.   natural join queries).
  386.  
  387. \item{} A schema that has already been used frequently is preferred
  388.   over a new schema. This guarantees that many existing queries can be
  389.   adapted easily to the benchmark.
  390.  
  391. \item{} For clarity, schema and attribute names must start with
  392.   capital letters.
  393. \end{itemize}
  394.  
  395. \subsection{The Schema}
  396.  
  397. The database schema consists of three valid-time relation schemas,
  398. {\tt Emp}, {\tt Skills}, and {\tt Dept}. They are defined as follows.
  399.  
  400. Relation {\tt Emp} uses the attributes {\tt Name}, {\tt Salary}, and
  401. {\tt Dept} for recording the salaries of employees and the departments
  402. where they work. In addition, it contains attributes {\tt Gender} and
  403. {\tt D-birth} which indicate the gender and date of birth of an
  404. employee. While the salary and department of an employee varies over
  405. time, both {\tt Gender} and {\tt D-birth} are time-invariant.
  406.  
  407. Relation {\tt Skills} records the association of employees with skills
  408. via the two attributes {\tt Name} and {\tt Skill}. The skills of an
  409. employee may vary over time. For example, employees are considered to
  410. have the skill ``driving'' only during those interval(s) when they
  411. hold valid licenses.
  412.  
  413. Relation {\tt Dept} records the association of employees, as managers,
  414. with departments, and it contains three attributes, {\tt Department},
  415. recording a department name, {\tt Manager}, recording the manager of
  416. the department, and {\tt Budget}, recording the budget of the
  417. department.
  418.  
  419. Attributes {\tt Name}, {\tt Dept}, {\tt Department}, {\tt Skill}, and
  420. {\tt Manager} are of type {\tt textString}; attribute {\tt Gender} is
  421. one of {\tt F} (female) and {\tt M} (male); {\tt Salary} and {\tt
  422.   Budget} are of type {\tt integer}; and {\tt D-birth} is a
  423. user-defined time value which may be compared with valid times.
  424.  
  425. The relation schemas obey the following {\em snapshot} functional
  426. and multivalued dependencies:
  427.  
  428. \begin{prog}
  429. For {\tt Emp}: \\
  430. \> {\tt Name} $\rightarrow$ {\tt Salary} \\
  431. \> {\tt Name} $\rightarrow$ {\tt Dept} \\
  432. \> {\tt Name} $\rightarrow$ {\tt Gender} \\
  433. \> {\tt Name} $\rightarrow$ {\tt D-birth} \\
  434. For {\tt Skills}: \\
  435. \> {\tt Name} $\mvd$ {\tt Skill} (and {\tt Name} $\not\rightarrow$
  436. {\tt Skills}) \\
  437. For {\tt Dept}: \\
  438. \> {\tt Department} $\rightarrow$ {\tt Manager} \\
  439. \> {\tt Manager} $\rightarrow$ {\tt Department} \\
  440. \> {\tt Department} $\rightarrow$ {\tt Budget}
  441. \end{prog}
  442.  
  443. Note that {\tt Name} is the primary key of {\tt Emp} (it is the only
  444. candidate key). For {\tt Skills}, there is no non-trivial key. For
  445. {\tt Dept}, each of {\tt Department} and {\tt Manager} is a candidate
  446. key, and {\tt Department} is selected as the primark key.
  447.  
  448. Each of the relation schemas are in snapshot Boyce-Codd normal form.
  449.  
  450. The attribute {\tt Manager} of {\tt Dept} is a foreign key for the
  451. attribute {\tt Name} of {\tt Emp}. Thus, a tuple is allowed to exist
  452. in the {\tt Dept} relation only if, for each non-empty snapshots of
  453. this tuple, the {\tt Manager} attribute value exists as a {\tt Name}
  454. value of some tuple in the simultaneous snapshot of the {\tt Emp}
  455. relation.
  456.  
  457. \section{The Benchmark Data}
  458.  
  459. \subsection{Criteria}
  460.  
  461. \begin{itemize}
  462. \item{} For simplicity and ease of typing, attribute values should be
  463.   short and salary values should be multiples of \$10,000.
  464.  
  465. \item{} Transitions (i.e., timestamp values) occur only at the
  466.   beginning of the month, and all dates should be in the time interval
  467.   from 1/1/81 to 12/31/88 (because the digits 8 and 9 are relatively
  468.   hard to distinguish). Time intervals are all specified by the
  469.   inclusive starting and ending events. Also for clarity, relation
  470.   instance names should start with lowercase letters.
  471.  
  472. \item{} The data should include a ``hole in the history'' of some
  473.   entity. For example, the database may be designed to contain a whole
  474.   in the employment of some employee.
  475.  
  476. \item{} The data should include asynchronous behavior of attributes.
  477.   For example, the department and salary of employees may change
  478.   independently.
  479. \end{itemize}
  480.  
  481. \subsection{The Proposed Data}
  482.  
  483. Three instances, {\tt emp}, {\tt skills}, and {\tt dept}, are defined
  484. over the {\tt Emp}, {\tt Skills}, and {\tt Dept} relation schemas,
  485. respectively. The contents of these instances is described below.
  486.  
  487. There are two employees, Ed and Di.
  488.  
  489. Ed worked in the Toy department from 2/1/82 to 1/31/87, and in the
  490. Book department from 4/1/87 to the present. His salary was \$20K from
  491. 2/1/82 to 5/31/82, then \$30K from 6/1/82 to 1/31/85, then \$40K from
  492. 2/1/85 to 1/31/87 and 4/1/87 to the present. Ed is male and was born
  493. on 7/1/55. Several skills are recorded for Ed. He has been qualified
  494. for typing since 4/1/82 and qualified for filing since 1/1/85. He was
  495. qualified for driving from 1/1/82 to 5/1/82 and from 6/1/84 to
  496. 5/31/88.
  497.  
  498. Di worked in and managed the Toy department from 1/1/82 to the
  499. present. The budget of the Toy department was \$150K from 1/1/82 to
  500. 7/31/84, \$200K from 8/1/84 to 12/31/86, and \$100K from 1/1/87 to the
  501. present. Her salary was \$30K from 1/1/82 to 7/31/84, \$40K from
  502. 8/1/84 to 8/31/86, then \$50K from 9/1/86 to the present. Di is female
  503. and was born on 10/1/60. Di has been qualified for directing from
  504. 1/1/82 to the present.
  505.  
  506. \end{document}